vcf.o overlay.o kml.o google.o lowranceusr.o an1.o tomtom.o \
tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o bcr.o coto.o \
ignrando.o stmwpp.o msroute.o cst.o nmn4.o mag_pdb.o compegps.o \
- yahoo.o
+ yahoo.o unicsv.o
FILTERS=position.o duplicate.o arcdist.o polygon.o smplrout.o \
reverse_route.o sort.o stackfilter.o trackfilter.o discard.o \
jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h \
jeeps/gpsnmeafmt.h jeeps/gpsnmeaget.h
trackfilter.o: trackfilter.c defs.h queue.h gbtypes.h strptime.h
+unicsv.o: unicsv.c defs.h queue.h gbtypes.h csv_util.h
util.o: util.c defs.h queue.h gbtypes.h
util_crc.o: util_crc.c
uuid.o: uuid.c uuid.h
#if !NO_EXPAT
#include <expat.h>
-static XML_Parser psr;
#endif
#define MYNAME "IGNRando"
-static FILE *fin, *fout;
+static FILE *fout;
static route_head *track;
static waypoint *wpt;
Hawaiian_mean"</para>
<para>Contributed by Alex Mottram.</para>
</section>
+ <section id="unicsv">
+ <sectioninfo>
+ <subtitle>Universal csv with field structure in first line.</subtitle>
+ </sectioninfo>
+ <title>unicsv</title>
+ <para>
+ Unicsv examines the first line of a file to determine the field
+ order and field separator in that file. It is thus read-only format.
+ </para>
+ <para>
+ If the first line contains any tabs, the data lines are assumed
+ to be tab separated. Otherwise the fields are assumed to be
+ separated by commas.
+ </para>
+ <para>
+ The list of keywords include "lat", "lon", "desc", "name",
+ "notes", "alt", and "url". Fuller spellings (i.e. "longitude") may
+ be used.
+ </para>
+ <para>
+ A typical file may be:
+ <screen format="linespecific">
+ Name, Latitude, Longitude, Description
+ GCEBB,35.972033,-87.134700,Mountain Bike Heaven by susy1313
+ GC1A37,36.090683,-86.679550,The Troll by a182pilot & Family
+ </screen>
+ </para>
+ </section>
<section id="vcard">
<sectioninfo>
<subtitle>vCard format for Apple iPod etc.</subtitle>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="35.972030000" minlon ="-87.134700000" maxlat="36.112180000" maxlon="-86.620120000" />
+<wpt lat="35.972030000" lon="-87.134700000">
+ <name> "GCEBB"</name>
+ <cmt> "Mountain Bike Heaven by susy1313"</cmt>
+ <desc> "Mountain Bike Heaven by susy1313"</desc>
+</wpt>
+<wpt lat="36.090680000" lon="-86.679550000">
+ <name> "GC1A37"</name>
+ <cmt> "The Troll by a182pilot & Family"</cmt>
+ <desc> "The Troll by a182pilot & Family"</desc>
+</wpt>
+<wpt lat="35.996270000" lon="-86.620120000">
+ <name> "GC1C2B"</name>
+ <cmt> "Dive Bomber by JoGPS & family"</cmt>
+ <desc> "Dive Bomber by JoGPS & family"</desc>
+</wpt>
+<wpt lat="36.038480000" lon="-86.648620000">
+ <name> "GC25A9"</name>
+ <cmt> "FOSTER by JoGPS & Family"</cmt>
+ <desc> "FOSTER by JoGPS & Family"</desc>
+</wpt>
+<wpt lat="36.112180000" lon="-86.741770000">
+ <name> "GC2723"</name>
+ <cmt> "Logan Lighthouse by JoGps & Family"</cmt>
+ <desc> "Logan Lighthouse by JoGps & Family"</desc>
+</wpt>
+<wpt lat="36.064080000" lon="-86.790520000">
+ <name> "GC2B71"</name>
+ <cmt> "Ganier Cache by Susy1313"</cmt>
+ <desc> "Ganier Cache by Susy1313"</desc>
+</wpt>
+<wpt lat="36.087770000" lon="-86.809730000">
+ <name> "GC309F"</name>
+ <cmt> "Shy's Hill by FireFighterEng33"</cmt>
+ <desc> "Shy's Hill by FireFighterEng33"</desc>
+</wpt>
+<wpt lat="36.057500000" lon="-86.892000000">
+ <name> "GC317A"</name>
+ <cmt> "GittyUp by JoGPS / Warner Parks"</cmt>
+ <desc> "GittyUp by JoGPS / Warner Parks"</desc>
+</wpt>
+<wpt lat="36.082800000" lon="-86.867280000">
+ <name> "GC317D"</name>
+ <cmt> "Inlighting by JoGPS / Warner Parks"</cmt>
+ <desc> "Inlighting by JoGPS / Warner Parks"</desc>
+</wpt>
+</gpx>
${PNAME} -i gpx -f ${TMPDIR}/wpts.gpx -f ${TMPDIR}/trks.gpx -f ${TMPDIR}/rtes.gpx -o gpx -F ${TMPDIR}/merged.gpx
compare ${TMPDIR}/alltypes.gpx ${TMPDIR}/merged.gpx
+#
+# Universal CSV - unicsv
+#
+echo "lat,lon,descr,name,notes,unk,unk" > ${TMPDIR}/unicsv.txt
+cat reference/mxf.mxf >> ${TMPDIR}/unicsv.txt
+${PNAME} -i unicsv -f ${TMPDIR}/unicsv.txt -o gpx -F ${TMPDIR}/unicsv.gpx
+compare ${TMPDIR}/unicsv.gpx reference/unicsv.gpx
+
exit 0
extern ff_vecs_t magpdb_vecs;
extern ff_vecs_t compegps_vecs;
extern ff_vecs_t yahoo_vecs;
+extern ff_vecs_t unicsv_vecs;
static
vecs_t vec_list[] = {
"Yahoo Geocode API data",
NULL
},
+ {
+ &unicsv_vecs,
+ "unicsv",
+ "Universal csv with field structure in first line",
+ NULL
+ },
{
NULL,
NULL,
#include "defs.h"
#include "xmlgeneric.h"
-static FILE *ifd;
static waypoint *wpt_tmp;
static char *as;